#ifndef TRAJECTORY3D_OSG
#define TRAJECTORY3D_OSG
#include <DefinePluginOsg.h>
#include <QObject>
#include <osg/MatrixTransform>
#include <OsgClassDataSource/MatrixTransformOsg.h>
#include <QUrl>
#include <osg/CopyOp>
#include <QEvent>
#include <QColor>
#include <osg/AnimationPath>
#include <QVarintTrigger.h>
class DLL_EXPORT_PLUGIN_OSG Trajectory3DOsg : public MatrixTransformOsg
{
	Q_OBJECT
    Q_ENUMS(LoopModeEnum)
        Q_PROPERTY(QColor LineColor READ getLineColor WRITE setLineColor)
        Q_PROPERTY(double LineWidth READ getLineWidth WRITE setLineWidth)
        Q_PROPERTY(QString MTName READ getMTName WRITE setMTName)
        Q_PROPERTY(LoopModeEnum LoopModeType READ getLoopMode WRITE setLoopMode)
        Q_PROPERTY(double DurationTime READ getDurationTime WRITE setDurationTime)
        Q_PROPERTY(QVarintTrigger ClearPoints READ getClearPoints WRITE setClearPoints)
        Q_PROPERTY(bool AnimatEnable READ getAnimatEnable WRITE setAnimatEnable)
        Q_PROPERTY(double TimeOffset READ getTimeOffset WRITE setTimeOffset)
public:

    enum LoopModeEnum {             SWING,
                                LOOP,
                                NO_LOOPING,
                                };


    Trajectory3DOsg(QObject *parent = 0);
    virtual ~Trajectory3DOsg();


    //virtual void copyFrom(EObject* objPtr);
    //virtual EObject* clone();

    QColor getLineColor();
    void setLineColor(const QColor& lineColor);

    double getLineWidth();
    void setLineWidth(double lineWidth);

    void setMTName(const QString& mtName);
    QString getMTName();

    void setLoopMode(LoopModeEnum loopMode);
    LoopModeEnum getLoopMode();

    void setDurationTime(double durationTime);
    double getDurationTime();

    QVarintTrigger getClearPoints();
    void setClearPoints(QVarintTrigger trigger);

    bool getAnimatEnable();
    void setAnimatEnable(bool boolValue);

    double getTimeOffset();
    void setTimeOffset(double doubleValue);

    virtual bool event( QEvent * e );
protected:

private:

};
#endif // TRAJECTORY3D_OSG
